<template>
	<view>
		<view class="content">
			<seeList :list="list"></seeList>
		</view>
		
	</view>
</template>

<script>
	// +----------------------------------------------------------------------
	// |万岳科技开源系统 [山东万岳信息科技有限公司]
	// +----------------------------------------------------------------------
	// | Copyright (c) 2020~2022 https://www.sdwanyue.com All rights reserved.
	// +----------------------------------------------------------------------
	// | 万岳科技相关开源系统代码并不是自由软件，未经授权许可不能去掉wanyue【万岳科技】相关版权并商用
	// +----------------------------------------------------------------------
	// | Author: 万岳科技开源官方 < wanyuekj2020@163.com >
	// +----------------------------------------------------------------------
	import seeList from '@/components/see-list/see-list.vue';
	import request from '@/util/request.js';
	const app = getApp();
	export default {
		components:{
			seeList
		},
		data() {
			return {
				list:[],//列表
				page:1,//分页
				isBottom:false,//有没有到底部
				hid: 0, //党建历史id
				historyList: [],
			}
		},
		onLoad(option){
			if(option.id != undefined) {
				this.hid = option.id;
				this.getKnowledgeById(option.id);
			}
		},
		onReachBottom(){
			var _this = this;
			if(this.isBottom==true){
				uni.showToast({
					title:'已经到底部了',
					icon:'none'
				})
				return;
			}
			var p = this.page+1;
			this.page = p;
			
		},
		methods: {
			getKnowledgeById(hid) {
				
				let that = this;
				uni.request({
					url: app.globalData.site_url+'/appapi/?s=Home.GetKnowledgeById',
					method: 'GET',
					data: {
						'hid' : hid
					},
					success: res => {
						if(res.data.data.code == 0) {
							that.list = res.data.data.info[0];
						}
					},
					fail: () => {
						uni.showToast({
							icon: 'none',
							title: '网络错误,请稍后再试'
						});
					},
				});
			}	
		}
		
		
	}
</script>

<style>
	.content{
		width: 94%;
		margin: 0 auto;
	}
</style>
